package com.situ.day8;

public class Demo {

    //argument:参数
    public static void main1(String[] args) {
        DaYan daYan = new DaYan();
        daYan.egg();
        daYan.fly();
        daYan.print();

        //bird是站在AbstractBird这个父类的角度去看new出来的DaYan
        AbstractBird bird = new DaYan();
        bird.egg();
        //bird.fly();
        //Cannot resolve method 'print' in 'AbstractBird'
        //bird.print();

        //站在能不能非IFly的角度去看DaYan，只能看到fly()这个方法
        IFly fly = new DaYan();
        fly.fly();
        //fly.egg();
        //fly.print();
        fly = new MiFeng();
        fly.fly();
    }

    public static void main(String[] args) {
        //Non-static method 'show()' cannot be referenced from a static context
        show();
    }

    public static void show() {
        System.out.println("Demo.show");
    }

}
